package com.bank.service;


import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bank.dao.BaseDao;
import com.bank.util.SessionUtils;

@Service
public class BaseService {

	Logger logger = Logger.getLogger(BaseService.class);
	
	@Autowired
	BaseDao   baseDao;
	
	public void setSesssionWorkdate(HttpServletRequest request){
		String workdate= baseDao.getWorkDate();
		logger.debug("workdate"+workdate);
		String workdateFormt  = workdate.substring(0, 4)+"-"+workdate.substring(4,6)+"-"+workdate.substring(6,8);
		SessionUtils.setSessionWorkdate(request, workdateFormt);
	}
	
}
